<template>

  <div class="container" >
    <el-form >
      <el-form-item>
        <el-button type="primary" @click="submitForm">查询</el-button>
        <el-button type="" @click="resetForm">重置</el-button>
        <el-button type="" @click="close">关闭</el-button>
      </el-form-item>
    </el-form>
    <data-view
      ref="dataViewSunMenu"
      propViewKey="sun_matr_mensu"
      :propAutoFetchData=true
      :propHideQueryButton=true
      :propPreQueryWrapper = "cpChildViewQueryWrapper"
      :propParentPage="_self"
      @extra-button-click="extraButtonClick"
      @before-button-click="beforebuttonclick"
    />
  </div>

</template>

<script>

/* eslint-disable*/
export default {
  name: 'sunMenu',
  created() {
    this.$ajax.get('/sun/getSunMenu').then((response) => {
      this.tableData = response.data
    })
  },
  data() {
    return {
      tableData: []
    }
  },
  methods: {
    //提交表单
    submitForm() {
      this.query()
    },

    //提交表单
    query() {
      this.utilVue.loadShow(true)
      this.tableData = []
      this.$ajax.get('/sun/getSunMenu').then((response) => {
        console.log('response', response)
        if (response.code == 0) {
          this.tableData = response.data
        }
        this.utilVue.loadHide()
      })
    },

    //重置
    resetForm() {
      this.tableData = []
    },

    //关闭
    close() {
      this.$emit('close')
    },
    //选择
    radioChange(row) {
      console.log('row参数', row)
      this.$emit('select-change', row)
      this.close()
    }
  }
}
</script>

<style lang="scss" scoped>
  .container {
    height: 100%;
    background-color: #fff;
  }
</style>
